using B.S.Domain.审计字段;
using System.ComponentModel.DataAnnotations;

namespace B.S.Domain.AICustomerService
{
    /// <summary>
    /// AI客服对话记录
    /// </summary>
    public class AIConversation : BaseModel
    {
        /// <summary>
        /// 对话ID
        /// </summary>
        public int ConversationId { get; set; }

        /// <summary>
        /// 会话ID，用于关联同一次对话的多轮消息
        /// </summary>
        public string SessionId { get; set; } = string.Empty;

        /// <summary>
        /// 用户ID
        /// </summary>
        public int? UserId { get; set; }

        /// <summary>
        /// 用户名称
        /// </summary>
        public string? UserName { get; set; }

        /// <summary>
        /// 用户消息
        /// </summary>
        public string UserMessage { get; set; } = string.Empty;

        /// <summary>
        /// AI回复消息
        /// </summary>
        public string AIResponse { get; set; } = string.Empty;

        /// <summary>
        /// 消息类型：text文本、image图片、file文件等
        /// </summary>
        public string MessageType { get; set; } = "text";

        /// <summary>
        /// 对话状态：active活跃、closed已关闭、pending等待中
        /// </summary>
        public string Status { get; set; } = "active";

        /// <summary>
        /// 用户满意度评分（1-5分）
        /// </summary>
        public int? SatisfactionRating { get; set; }

        /// <summary>
        /// 用户反馈意见
        /// </summary>
        public string? UserFeedback { get; set; }

        /// <summary>
        /// AI处理耗时（毫秒）
        /// </summary>
        public int? ProcessingTime { get; set; }

        /// <summary>
        /// 是否已解决问题
        /// </summary>
        public bool IsResolved { get; set; } = false;

        /// <summary>
        /// 问题分类标签
        /// </summary>
        public string? CategoryTag { get; set; }

        /// <summary>
        /// 客户端IP地址
        /// </summary>
        public string? ClientIP { get; set; }

        /// <summary>
        /// 用户设备信息
        /// </summary>
        public string? DeviceInfo { get; set; }
    }
}
